import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
import 'package:meal/constant/sizes.dart';
import 'package:meal/ui/draw_under_line.dart';
import 'package:meal/utils/colors.dart';
import 'package:meal/utils/styles.dart';
import 'package:meal/utils/tools.dart';

/// 提现详情
class WithdrawalInfo extends StatefulWidget {
  const WithdrawalInfo({Key? key}) : super(key: key);

  @override
  State<WithdrawalInfo> createState() => _WithdrawalInfoState();
}

class _WithdrawalInfoState extends State<WithdrawalInfo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: ToolsUtils.getDefaultBrnAppBar('提现详情'),
      body: SingleChildScrollView(
        padding: const EdgeInsets.all(Sizes.default20),
        child: Column(
          children: [
            Container(
              height: Sizes.default50,
              alignment: Alignment.center,
              child: Text(
                '￥1,000.00',
                style: StylesUtils.customTextStyle(
                    fontSize: Sizes.default28, color: ColorsUtils.colorFf0),
              ),
            ),
            Container(
              alignment: Alignment.center,
              child: Text(
                '提现成功',
                style: StylesUtils.customTextStyle(color: ColorsUtils.color797),
              ),
            ),
            SizedBox(
              height: Sizes.default30,
              child: DrawUnderLine(
                color: ColorsUtils.parseColorFromHexString('#D7D7D7'),
                child: Container(),
              ),
            ),
            Container(
              margin: const EdgeInsets.only(top: Sizes.default30),
              height: Sizes.default40,
              child: Row(
                children: [
                  Expanded(
                      child: Container(
                    alignment: Alignment.centerLeft,
                    child: Text(
                      '提现说明',
                      style: StylesUtils.customTextStyle(color: ColorsUtils.color333),
                    ),
                  )),
                  Expanded(
                    flex: 3,
                    child: Container(
                      alignment: Alignment.centerLeft,
                      child: Text(
                        '余额提现',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color797),
                      ),
                    ),
                  )
                ],
              ),
            ),
            SizedBox(
              height: Sizes.default40,
              child: Row(
                children: [
                  Expanded(
                      child: Container(
                    alignment: Alignment.centerLeft,
                    child: Text(
                      '手续费',
                      style: StylesUtils.customTextStyle(color: ColorsUtils.color333),
                    ),
                  )),
                  Expanded(
                    flex: 3,
                    child: Container(
                      alignment: Alignment.centerLeft,
                      child: Text(
                        '￥5',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color797),
                      ),
                    ),
                  )
                ],
              ),
            ),
            Row(
              children: [
                Expanded(
                    child: Container(
                  alignment: Alignment.centerLeft,
                  child: Text(
                    '处理进度',
                    style: StylesUtils.customTextStyle(color: ColorsUtils.color333),
                  ),
                )),
                Expanded(
                  flex: 3,
                  child: Container(
                    alignment: Alignment.centerLeft,
                    child: ListBody(
                      children: [
                        BrnStepLine(
                          lineWidth: 1,
                          lineColor: Colors.black.withOpacity(0.4),
                          contentLeftPadding: Sizes.default30,
                          contentWidget: Column(
                            children: [
                              Container(
                                alignment: Alignment.centerLeft,
                                child: Text(
                                  '处理中',
                                  style: StylesUtils.customTextStyle(color: ColorsUtils.color797),
                                ),
                              ),
                              Container(
                                alignment: Alignment.centerLeft,
                                margin: const EdgeInsets.only(top: Sizes.default10, bottom: Sizes.default40),
                                child: Text(
                                  '11-19 14:13',
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.color797, fontSize: Sizes.default12),
                                ),
                              )
                            ],
                          ),
                          iconWidget: ToolsUtils.getUrlSvg(
                              'https://cdn7.axureshop.com/demo/1525603/images/提现详情/u1985.svg',
                              width: Sizes.default18,
                              height: Sizes.default18),
                        ),
                        BrnStepLine(
                          lineWidth: 1,
                          lineColor: Colors.black.withOpacity(0.4),
                          contentLeftPadding: Sizes.default30,
                          contentWidget: Column(
                            children: [
                              Container(
                                alignment: Alignment.centerLeft,
                                child: Text(
                                  '提现成功',
                                  style: StylesUtils.customTextStyle(color: ColorsUtils.color797),
                                ),
                              ),
                              Container(
                                alignment: Alignment.centerLeft,
                                margin: const EdgeInsets.only(top: Sizes.default10),
                                child: Text(
                                  '11-19 20:13',
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.color797, fontSize: Sizes.default12),
                                ),
                              )
                            ],
                          ),
                          iconWidget: ToolsUtils.getUrlSvg(
                              'https://cdn7.axureshop.com/demo/1525603/images/提现详情/u1985.svg',
                              width: Sizes.default18,
                              height: Sizes.default18),
                        ),
                      ],
                    ),
                  ),
                )
              ],
            ),
            Container(
              height: Sizes.default40,
              margin: const EdgeInsets.only(top: Sizes.default20),
              child: Row(
                children: [
                  Expanded(
                      child: Container(
                    alignment: Alignment.centerLeft,
                    child: Text(
                      '提现到',
                      style: StylesUtils.customTextStyle(color: ColorsUtils.color333),
                    ),
                  )),
                  Expanded(
                    flex: 3,
                    child: Container(
                      alignment: Alignment.centerLeft,
                      child: Text(
                        '支票（凌峰）',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color797),
                      ),
                    ),
                  )
                ],
              ),
            ),
            SizedBox(
              height: Sizes.default40,
              child: Row(
                children: [
                  Expanded(
                      child: Container(
                    alignment: Alignment.centerLeft,
                    child: Text(
                      '交易时间',
                      style: StylesUtils.customTextStyle(color: ColorsUtils.color333),
                    ),
                  )),
                  Expanded(
                    flex: 3,
                    child: Container(
                      alignment: Alignment.centerLeft,
                      child: Text(
                        '2023-02-10 12:45:30',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color797),
                      ),
                    ),
                  )
                ],
              ),
            ),
            SizedBox(
              height: Sizes.default40,
              child: Row(
                children: [
                  Expanded(
                      child: Container(
                    alignment: Alignment.centerLeft,
                    child: Text(
                      '交易单号',
                      style: StylesUtils.customTextStyle(color: ColorsUtils.color333),
                    ),
                  )),
                  Expanded(
                    flex: 3,
                    child: Container(
                      alignment: Alignment.centerLeft,
                      child: Text(
                        '41220211119135924002',
                        style: StylesUtils.customTextStyle(color: ColorsUtils.color797),
                      ),
                    ),
                  )
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
